﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;


namespace DataLayer
{
    public class dlDeleteMember
    {
        public void DeleteMember(int userid)
        {
            string mijnconnectiestring;

            mijnconnectiestring = ConfigurationManager.ConnectionStrings["constring"].ConnectionString;

            SqlConnection conn = new SqlConnection(mijnconnectiestring);

            // might have to  before insert

            conn.Open();

            string insertString = @"delete from TeamUser where TeamUser.UserId = " + userid + "";

            SqlCommand Query = new SqlCommand(insertString, conn);

            //Query.Parameters.AddWithValue("@teamid", teamnaam);

            Query.ExecuteNonQuery();

            conn.Close();

        }
    }
}
